﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Talentnet.Core.Web
{
    public class IntruderSettings
    {
        public IntruderSettings(string name, Type type, int minLength, int maxLength)
        {
            this._max = maxLength;
            this._min = minLength;
            this._name = name;
            this._type = type;
        }
        public IntruderSettings(string name, Type type, int minLength, int maxLength, string expression)
        {
            this._max = maxLength;
            this._min = minLength;
            this._name = name;
            this._type = type;
            this._regEx = expression;
        }
        private string _name;

        public string Name
        {
            get { return _name; }
            set { _name = value; }
        }

        private bool _allowEmpty = true;

        public bool AllowEmty
        {
            get { return _allowEmpty; }
            set { _allowEmpty = value; }
        }


        private Type _type;

        public Type DataType
        {
            get { return _type; }
            set { _type = value; }
        }

        private int _max = 0;

        public int MaxLength
        {
            get { return _max; }
            set { _max = value; }
        }

        private int _min = 0;

        public int MinLength
        {
            get { return _min; }
            set { _min = value; }
        }

        private string _regEx = "";

        public string RegularExpression
        {
            get { return _regEx; }
            set { _regEx = value; }
        }

    }
}
